#ifndef GAME_H
#define GAME_H

#include <map>
#include "Singleton.h"
#include "NonCopyable.h"
#include "GameState.h"

// Stores the GameStates in a map sorted by the state name.
typedef std::map<std::string,GameState*> States;

class Game : public NonCopyable
{
public:
	~Game();

	//------ForGameStates-----
	void SetGameState(const GameState* State);
	void SetGameState(const char* StateName);
	bool AddGameState(const std::string& StateName, GameState* gs);
	void Run();
	bool Load();
	void Update();
	void Draw();

private:
	Game();
	friend class Singleton<Game>;

private:
	//------GameStates------
	GameState* m_pCurrentState;
	States m_States;

};

typedef Singleton<Game> TheGame;

#endif